package br.cin.stadium.application;

import br.cin.stadium.middleware.StadiumTS;
import br.cin.stadium.middleware.media.Media;

public class ServerBehaviour
{
	public void execute()
	{
		// create media
		try {
			String name = "goal1";
			String type = "mp4";
			int stadiumSector = 1;
			byte[] video = new byte[0];

			Media media = new Media(name, type, stadiumSector, video); // name, type, stadiumSector, content

			// publish the media
			StadiumTS.getInstance().write(media);
			
			media = new Media("goal2", "mp4", 1, new byte[10]);
			StadiumTS.getInstance().write(media);
			media = new Media("goal3", "mp4", 2, new byte[10]);
			StadiumTS.getInstance().write(media);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}
}
